Don't reset post-command-hook to nil upon error.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 28 Mar 2011 20:26:35 +0000 (16:26 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 28 Mar 2011 20:26:35 +0000 (16:26 -0400)
commit5e4cb836580a8ef2f9ea9b4b8317005941920027
treec13d4523d6a19be20c0b7cd0ed2b48e6dd240a63
parent6e7cabcd12ccc55ee6e52f0d6bd5c27e81c73149
Don't reset post-command-hook to nil upon error.
* src/eval.c (enum run_hooks_condition): Remove.
(funcall_nil, funcall_not): New functions.
(run_hook_with_args): Call each function through a `funcall' argument.
Remove `cond' argument, now redundant.
(Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
(Frun_hook_with_args_until_failure): Adjust accordingly.
(run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
* src/keyboard.c (safe_run_hook_funcall): New function.
(safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
don't set the hook to nil, but remove the offending function instead.
(Qcommand_hook_internal): Remove, unused.
(syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
Vcommand_hook_internal.
* doc/lispref/commands.texi (Command Overview): post-command-hook is not reset
to nil any more.
doc/lispref/ChangeLog
doc/lispref/commands.texi
etc/NEWS
src/ChangeLog
src/eval.c
src/keyboard.c
src/lisp.h